package com.happy.zebra.admin.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.happy.zebra.admin.api.entity.SysUser;
import com.happy.zebra.admin.service.SysUserService;
import com.shycloud.mido.common.core.util.R;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 额外用户管理
 * 给师资培训讲师管理新增时提供用户关联
 * 运营后台 新建服务商关联用户
 */
@RestController
@AllArgsConstructor
@RequestMapping("/extraUser")
public class ExtraUserController {

	private final SysUserService sysUserService;

	@GetMapping("/getExtraUser/{userCate}")
	public R  getExtraUser(@PathVariable String userCate){
		SysUser sysUser = new SysUser();
		sysUser.setLockFlag("0");
		sysUser.setUserCate(userCate);
		return new R<>(sysUserService.list(new QueryWrapper<>(sysUser)));
	}
}
